{% extends "base_blank.volt" %}

{% block pageFooter%}
    {{ javascript_include("/assets/manage/js/activity/bpList.js", false) }}
{% endblock %}

{% block content %}

    <div class="container-fluid" id="content_box_blank">
        <div class="row">
            <div class="col-xs-12">
                <ol class="breadcrumb">
                    <li>活动管理</li>
                    <li class="active">参与活动的美容院</li>
                </ol>

                <table class="table table-hover">
                    <thead>
                    <tr>
                        <th style="width: 60px;">ID</th>
                        <th style="width: 100px;">封面</th>
                        <th>名称</th>
                        <th style="width: 150px;">城区</th>
                        <th style="width: 60px;">是否<br />销售</th>
                        <th style="width: 60px;">退款<br />保障</th>
                        <th style="width: 60px;">深度<br />验店</th>
                        <th style="width: 180px;"></th>
                    </tr>
                    </thead>
                    {% for d in data %}
                        <tr>
                            <td>{{ d.bp_id }}</td>
                            <td><img src="{{ PicUrlBPCover(d.bp_cover, this.di) }}@!90" /></td>
                            <td>{{ d.bp_name|e }}</td>
                            <td>{{ d.district }}</td>
                            <td>{{ d.bp_is_sell == 1 ? 'Y' : 'N' }}</td>
                            <td>{{ BPMedalRefund(d.bp_medal) == 1 ? 'Y' : 'N' }}</td>
                            <td>{{ BPMedalVerify(d.bp_medal) == 1 ? 'Y' : 'N' }}</td>
                            <td>
                                <div class="dropdown">
                                    <button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu{{ d.relation_id }}" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true"><i class="fa fa-cogs"></i> 操作 <span class="caret"></span>
                                    </button>
                                    <ul class="dropdown-menu" aria-labelledby="dropdownMenu{{ d.relation_id }}">
                                        <li><a href="/frontend/share/beautyParlor?id={{ d.bp_id }}" target="_blank"><i class="fa fa-eye fa-fw"></i> 预览</a></li>
                                        <li role="separator" class="divider"></li>
                                        <li><a href="javascript:void(0)" durl="{{ url.get('activity/setBpState') }}" did="{{ d.relation_id }}" dstate="-1" class="but_set_state"><i class="fa fa-trash-o fa-fw"></i> 删 除</a></li>

                                    </ul>
                                </div>
                            </td>
                        </tr>
                    {% endfor %}
                </table>

                <div class="row">
                    <div class="col-xs-12 text-center">
                        <a href="{{ url.get('activity/addBp', ['id': id]) }}" class="btn btn-primary"><i class="fa fa-plus fa-lg"></i> 添加美容院到活动中</a>
                    </div>
                </div>

            </div>
        </div>
    </div>
{% endblock %}